1. Field of the Invention
The invention relates generally to the field of quality control, particularly to the inspection, measuring and sorting of products moving on a production line, so that, based upon the results of the inspection, the products are either accepted for use or rejected.
2. Prior Art
Many mass produced products must be inspected prior to shipment. E.g., beverage bottles must be inspected for flaws prior to filling to prevent breakage in use and consequent lawsuits, injuries, property damage, etc. Heretofore one method of inspection has been manual: an inspector simply observes the bottles passing by on an assembly line. However manual inspection is fraught with defects principally due to inspector inattention, fatigue, slow throughput, etc. Thus automated inspection machines have come into vogue.
Today one automated inspection machine analyzes images of bottles by means of video cameras and computers. Products of more complicated structure, such as screws, require several image inspection steps. The images taken by the video camera are stored in the memory of a computer in one of several standard formats which depends on the type of the camera used for taking those images. For example, an industrial solid state camera manufactured by Panasonic, Inc. under model GP-CD60, has a resolution of 649(H).times.491(V) pixels, i.e., 491 lines by 649 pixels per line for an image. A pixel is the smallest element of an image that can be individually processed in a video display system. Different formats are used in Europe.
Normally a pixel-based product inspection system contains a source of light that illuminates the product being inspected. Usually the light has a specific wavelength. Some products are more transparent to light than others, e.g., some can be made of colored glass, others from an opaque material. Most of the video cameras used for inspection are industrial cameras which are able to take more than =b 30 images per minute, which is a standard. A memory for storing images must be sufficient to hold image gray levels, and the computer must be fast-acting to ensure quick analysis of the image. (The same method can be implemented for stationary products).
There are also line cameras which utilize line sensors. The lines are analyzed with, e.g., 512 or 1024 pixels. In this system, images of the products being inspected are stored in a computer's memory and analyzed by means of an algorithm, also stored in a computer's memory. The purpose of such control is to determine whether the products have defects and whether the defects are within allowable limits. Another purpose is to determine the locations of the defects in the product's material. However, line-by-line algorithmic analysis of defects and their locations is a slow and time-consuming procedure.
Still another method of inspecting images is the use of histograms of full images. This technique has the advantage of quick results, since in most cases image-processing equipment calculates the function in computer hardware. A histogram of a full image is defined as a vector and the data is stored in each location of the vector. The histogram vector length equals the number of gray levels in an image. The data in each vector location is the number of pixels for that particular gray level in the picture. Standard cameras use 128 gray levels to express the full range of light intensity, i.e., in this case the histogram vector length will be 128 locations. Each pixel in the image can have a definite gray level value, i.e., one out of the range of levels between 0 to 127. The length of the histogram vector is equal to the number of gray levels in the image.
In the above example the histogram length is 128. E.g., the value stored in location 77 of the histogram vector will indicate the number of pixels in the image which has a gray level value of 77.
The histogram-based technique is indeed much faster than line-by-line inspection. However, it produces inaccurate results and does not allow the determination of the locations and magnitudes of individual defects in the products. Another problem associated with the histogram technique is its high dependence on the ability of finding the geometrical centers of the products. For example, when inspecting bottles, it is first necessary to calculate the location of each bottle's center.
Today industry increasingly demands higher-speed inspection techniques. Some production lines operate with an output of 2000 products per minute and with the time interval for inspecting a product as short as 30 milliseconds. Therefore a strong demand for fast and efficient image inspection algorithms exist.